<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.attribute name="currentPage" required="true" />
<jsp:directive.attribute name="nbPages" required="true" />
<jsp:directive.attribute name="url" required="true" />
	<c:if test="${nbPages &gt; 1}">
		<div class="pagination pagination-centered">
			<ul>
				<c:choose>
					<c:when test="${currentPage &gt; 1}">
						<li><a href="${url}/${currentPage - 1}">«</a></li>
					</c:when>
					<c:otherwise>
						<li class="disabled"><a href="#">«</a></li>
					</c:otherwise>
				</c:choose>
				<li class="disabled"><a href="#">${currentPage} / ${nbPages}</a></li>
				<c:choose>
					<c:when test="${(currentPage - nbPages) &lt; 0}">
						<li><a href="${url}/${currentPage + 1}">»</a></li>
					</c:when>
					<c:otherwise>
						<li class="disabled"><a href="#">»</a></li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</c:if>
</jsp:root>